<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			.hide {
				display: none;
			}
			.box {
				width: 200px; height: 100px; background: grey;
			}
		</style>
	</head>
	<script type="text/javascript" src="js/jquery-1.8.3.js" ></script>
	<script type="text/javascript">
		$(function(){
//			$("div").html("你好");
//			div.innerHTML = "nihao"
			
			/*console.log( 
				$("div").text() //取值的时候，只取第一个
			);*/
			$("button").click(function(){
				$("div:last").toggleClass("hide");
			});
			
			console.log( $("div:last").outerWidth() );
		})
	</script>
	<body>
		<div>A
			<span>ABC</span>
		</div>
		<div>B</div>
		<div>C</div>
		<div>D</div>
		<div class="box"></div>
		<button>显示或隐藏</button>
	</body>
</html>
